package py.una.pol.raphapy.autoventas.view.administracion;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;
import javax.persistence.PrePersist;

import py.una.pol.raphapy.autoventas.controller.DocumentoPersonaController;
import py.una.pol.raphapy.autoventas.controller.PersonaController;
import py.una.pol.raphapy.autoventas.view.core.InterfazFormulario;

@ManagedBean (name="formularioPersona")
@ViewScoped
public class FormularioPersona implements InterfazFormulario {
	
	@ManagedProperty(value="#{personaController}")
	PersonaController personaController;
	
	@ManagedProperty(value="#{documentoPersonaController}")
	DocumentoPersonaController documentoPersonaController;
	
	public PersonaController getPersonaController() {
		return personaController;
	}
	
	public void setPersonaController(PersonaController personaController) {
		this.personaController = personaController;
	}

	public DocumentoPersonaController getDocumentoPersonaController() {
		return documentoPersonaController;
	}

	public void setDocumentoPersonaController(
			DocumentoPersonaController documentoPersonaController) {
		this.documentoPersonaController = documentoPersonaController;
	}

	@Override
	
	public String confirmar() {
		
		//TODO
		
		return "listarPersonas";
	}

	@Override
	public String cancelar() {
		
		return "listarPersonas";
	}

	@Override
	public void limpiar() {
		// TODO Auto-generated method stub
		return;
	}

}
